<?php
namespace Home\Controller;
use Think\Controller; 
class AuthorizeController extends Controller {
	//授权
	function index(){
		
		if(isset($_GET['top_appkey'])){
			$where['appkey']=$_GET['top_appkey'];
			$data['sessionkey']=$_GET['top_session'];
			$data['modify_time']=date('Y-m-d H:i:s');
			$data['visitor_id']	 = $_SESSION['user']['id'];
			$shop=M('shop');
			$res=$shop->where($where)->save($data);
			$this->redirect('shop/index');
		}
		
		
	}
	
}